package com.java.dao.impl;

import com.java.dao.UserDao;
import com.java.domain.User;

import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 * 无参构造
 */

public class UserDaoImpl implements UserDao {

    private List<String> list;
    private Map<String, User> map;
    private Properties properties;

    private String username;
    private int age;

    public UserDaoImpl(List<String> list, Map<String, User> map, Properties properties, String username, int age) {
        this.list = list;
        this.map = map;
        this.properties = properties;
        this.username = username;
        this.age = age;
    }

    public UserDaoImpl() {
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public void setMap(Map<String, User> map) {
        this.map = map;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setAge(int age) {
        this.age = age;
    }

//    public void init(){
//        System.out.println("初始化完成");
//    }

//    public void destroy(){
//        System.out.println("销毁完成");
//    }

    @Override
    public void login() {
        System.out.println(list);
        System.out.println(map);
        System.out.println(properties);
        System.out.println("login succeed....");
    }
}
